const mongoose = require('mongoose')
const Schema = mongoose.Schema
mongoose.connect('mongodb://localhost/blog')

const caseSchema = new Schema({
  title: {
    type: String,
  },
  technology: {
    type: String,
  },
  describe: {
    type: String,
  },
  date: {
    type: String,
    default: Date.now()
  },
  link: {
    type: String,
  },
})

const Case = mongoose.model('case', caseSchema)
module.exports = Case